package com.slipper.system.schedule.bo;

import com.slipper.common.bo.CommonBO;
import org.springframework.web.multipart.MultipartFile;

import java.util.Arrays;

/**
 * 任务调度
 */
public class ScheduleBO extends CommonBO {
    public static final String STATUS_NORMAL = "正常";
    public static final String STATUS_PAUSE = "暂停";

    public static final String BUSINESS_SCRIPT = "脚本";
    public static final String BUSINESS_COLLECT = "采集任务";

    public static final String TYPE_EVERY_DAY = "每天";
    public static final String TYPE_EVERY_WEEK = "每周";
    public static final String TYPE_EVERY_MONTH = "每月";
    public static final String TYPE_CUSTOM = "自定义";

    private String id;
    private String[] ids;
    private String type;
    private String period;
    private String time;
    private String expression;
    private String businessType;
    private String businessId;
    private String businessName;
    private String params;
    /* 状态： 正常 暂停 */
    private String status;
    /* 备注 */
    private String remark;
    /* 更新时间 */
    private Long updateTime;
    /* 创建时间 */
    private Long createTime;
    private MultipartFile file;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String[] getIds() {
        return ids;
    }

    public void setIds(String[] ids) {
        this.ids = ids;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getPeriod() {
        return period;
    }

    public void setPeriod(String period) {
        this.period = period;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getExpression() {
        return expression;
    }

    public void setExpression(String expression) {
        this.expression = expression;
    }

    public String getBusinessType() {
        return businessType;
    }

    public void setBusinessType(String businessType) {
        this.businessType = businessType;
    }

    public String getBusinessId() {
        return businessId;
    }

    public void setBusinessId(String businessId) {
        this.businessId = businessId;
    }

    public String getBusinessName() {
        return businessName;
    }

    public void setBusinessName(String businessName) {
        this.businessName = businessName;
    }

    public String getParams() {
        return params;
    }

    public void setParams(String params) {
        this.params = params;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Long updateTime) {
        this.updateTime = updateTime;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public MultipartFile getFile() {
        return file;
    }

    public void setFile(MultipartFile file) {
        this.file = file;
    }

    @Override
    public String toString() {
        return "ScheduleBO{" +
                "id='" + id + '\'' +
                ", ids=" + Arrays.toString(ids) +
                ", type='" + type + '\'' +
                ", period='" + period + '\'' +
                ", time='" + time + '\'' +
                ", expression='" + expression + '\'' +
                ", businessType='" + businessType + '\'' +
                ", businessId='" + businessId + '\'' +
                ", businessName='" + businessName + '\'' +
                ", params='" + params + '\'' +
                ", status='" + status + '\'' +
                ", remark='" + remark + '\'' +
                ", updateTime=" + updateTime +
                ", createTime=" + createTime +
                ", file=" + file +
                '}';
    }
}
